<?php 
class CartWS_Model_ProductType extends Ext_Db_Table
{
	protected $_name = 'pr_product_type';
	protected $_sequence = 'pr_product_type_seq';
	public function getSelectWithDescr()
	{
		return $this->getAdapter()->select()
			->from( array( 'pt' => 'pr_product_type' ), 
				array( 'pt.*', 'fend_date' => "to_char( pt.end_date, '". self::DEFAULT_DATE_FORMAT. "')" ))
			->join( 
				array( 'tc' => 'sc_tax_class' )
				, 'pt.tax_class_id = tc.tax_class_id'
				, array( 'ttitle'=>'tc.title' ) 
			)
			->join( 
				array( 'or1' => 'or_organization' )
				, 'or1.organization_id = pt.organization_id'
				, array( 'oname'=>'or1.name' ) 
			);
			
		
		
	}
}